package com.asm.slidingmenu.adapter;

import java.util.ArrayList;

import com.asm.DBloader.ASM_AVTemp;
import com.asm.DBloader.ASM_fItems;
import com.dspl.asmswd.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;

public class AVSheetLoadItemAdapter extends ArrayAdapter<ASM_fItems> {

	
	Context context;
	public static ArrayList<ASM_fItems> list2;
	
	public AVSheetLoadItemAdapter(Context context, ArrayList<ASM_fItems> list) {
		super(context, R.layout.asm_avsheet_det,list);
		this.context = context;
		this.list2 = list;
		// TODO Auto-generated constructor stub
	}
	@Override
	public View getView(final int position, final View convertView, final ViewGroup parent) {
		
		LayoutInflater inflater = null;
		View row = null;
		
		inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		row = inflater.inflate(R.layout.asm_avsheet_det, parent, false);

		final Button Itemcode = (Button) row.findViewById(R.id.itemcode);
		Itemcode.setText(list2.get(position).getAsmFItems_ItemName()+"-:-"+list2.get(position).getAsmFItems_ItemCode());
		return row;
	}
}
